home *** CD-ROM | disk | FTP | other *** search
/ Deutsche Edition 1 / Deutsche Edition 1.iso / amok / 031-040 / amok35 / spellchecker / spellchecker.doc < prev    next >
Text File  |  1993-11-04  |  8KB  |  135 lines

  1. SpellChecker - short Documentation for Users
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3. The SpellChecker is a program to checking the right writing of words
  4. in textfiles. You can use it without any problems with
  5. ASCII-textfiles. If You use it with files of word-prozessing-programs,
  6. there may be some problems, because of strange control-sequences in
  7. these files. A other problem can occur, if You use SpellChecker with a
  8. word-processor, that saves the files with a constant linelength. If
  9. You than correct errors in these lines, the new linelength will differ
  10. from the former length, and the word-processor may have problems
  11. reading the modified file. Test it with an old text.
  12.  
  13. The basis of this program is a list (Array) of correct written words.
  14. If SpellChecker checks a text, it reads a word from this text and
  15. searchs for this word in the list. If the word is found, it is assumed
  16. to be correct, otherwise this word can be wrong and the user has the
  17. possibility to change it. But how get we this list of correct written
  18. words? Well, its easy. We join some textfiles (from different autors)
  19. to a big textfile. (The textfiles we can get from PD-Docs or from
  20. Disk-magazines). Than we read the words from this textfile and sort
  21. than into the list. If we read a word that is already in the list, we
  22. increase a counter related to this word. So we get a list of words.
  23. The counters show the frequency of this words. If the list is big
  24. enough, we can delete all words with low counters. These words can be
  25. wrong or extremely seldom. The other words with high counters are used
  26. often by different authors, so we assume that these are correct words.
  27. This was the basic idea of this program, now I explain how to use it.
  28.  
  29. Start it from WB by double-clicking its Icon or from CLI with [run]
  30. SpellChecker. But this program needs the ARP-Library, the Divice T:
  31. and some Memory , I think 300 kByte free ram should be enough. If You
  32. have started the program, You see a Window with ten Boolean-Gadgets
  33. and a StringGadget. At this time the list of words (this list I will
  34. call sometimes Lexikon) contains no words. To fill the Lexikon, You
  35. can load it, or generate it. Generating is only necessary if You will
  36. create a Lexikon for a new language. With this program I will give You
  37. two Lexikons, one with english, and one with german words. For other
  38. languages You have to generate Your own.
  39.  
  40. Generating or expanding a Lexikon is the same procedure. First You
  41. need a big textfile with the words You want to use for the Lexikon.
  42. The savest method is to use ASCII-Files. (If You use files of Your
  43. word-processor, you should make a small test, see "ExportLex" ). Assume
  44. You have a big textfile on a Disk in drive df1: with name
  45. "BigTextFile". Now click On the Gadget "ExpandLex". You will see the
  46. ARP-FileRequester. I think you should know this requester, so I don't
  47. explain it. Click in this Requester on "Drives", than on "DF1:", than
  48. on "BigTextFile" and at least on "OK". Now the Requester will vanish,
  49. all Gadgets will be ghostered and the mouse-pointer will sleep,
  50. indicating that the program is working and can't react on Your input.
  51. Now the program generates a Lexikon. If the Lexikon was empty, a new
  52. Lexikon will be generated, otherwise the current Lexikon is expanded.
  53. This generating or expanding will take some time. For example, I have
  54. use for such a generating a 600 kByte textfile in ram: It takes over
  55. 60 minutes to generate with this big file a Lexikon containing 11000
  56. words. And with diskdrives it takes much more time, because the
  57. sourcetext is readed 4 times. Sorry for this long waiting-time, but of
  58. course You have to wait only one time.
  59.  
  60. If the generating is completed, the Gadgets will get there normal
  61. Image, and in the textarea there You can read something like this:
  62. Words: 9999     MinCount: 1     MaxCount 178
  63.  
  64. Now you have a Lexikon with 9999 words. You should save it by clicking
  65. on "SaveLex". The ARP-Filerequester appears. You can use the default
  66. name "Lexikon" to save it, or You can change it in the Stringgadget.
  67. Than click on "OK" to save it.
  68.  
  69. Well, now You have 9999 words, but some of this words may be wrong
  70. written or may be extremely seldom words or names. To delete these,
  71. click on the Gadget "CleanLex". Every click will delete all words from
  72. the Lexikon  that have the lowest counters. The first click will
  73. delete words with counter=1, the next click the words with counter=2
  74. and so on. Don't worry, if you have clicked too often, so that there
  75. are now only a few word in the Lexikon, You can load the original
  76. Lexikon back from disk by clicking on "LoadLex".
  77.  
  78. For example, if MinCount=3, then all words in the Lexikon are found
  79. tree or more times in the text that You have used to generate the
  80. Lexikon. If MaxCount=56, there was no word in this text that was found
  81. for more than 56 times. (MaxCount will not grow, if it already 255)
  82.  
  83. Now You have a Lexikon which You can load each time when You are using
  84. the SpellChecker. To check a textfile for correct writing, load the
  85. Lexikon and then click on "CheckText". Now load this textfile in the
  86. same way as You have loaded the Lexikon. After loading, the
  87. SpellChecker will start to examine the text. It read from this text a
  88. word and searchs for this word in the Lexikon. If it founds it, this
  89. word is assumed to be a correct written word and SpellChecker reads
  90. the next word. Otherwise, if the word is not found in the Lexikon, this
  91. word can be wrong written, and You, the user, have to decide if it is
  92. correct or not. You can correct this word in the StringGadget. If You
  93. hit "Return" or click on "Ignore", this word is corrected in the
  94. textfile, but it is not added to the Lexikon. If You click on
  95. "AddToLex" this word is corrected and added to the Lexikon. The
  96. SpellChecker distinguish between words with upper and lower case!
  97. SpellChecker knows, that the first letter of a sentence have to be
  98. upper-case. If You click on "AddToLex", You have to pay attention to
  99. the first letter of this word. Add words only to the Lexikon in the
  100. form as the word is written in the MIDDLE OF A SENTENCE!!! For example
  101. in the sentence: "This is a short sentence" the first letter in the
  102. word "This" is upper case, and this is correct, but You should NOT add
  103. this word in this form to the Lexikon because the normal writing of
  104. the word "this" is with the first letter in lower case!
  105.  
  106. You can correct all words in this way, or cancel this operation by
  107. clicking on the "WindowCloseGadget" or on "Quit". If You click on "Quit"
  108. or the "WindowCloseGadged" before all words are corrected, the
  109. textfile will be unchanged.
  110.  
  111. If You click on "DelWords", You can delete single words from the
  112. Lexikon. For example, if You suppose that there is a wrong written
  113. word in the Lexikon, than click on "DelWords", type this word in the
  114. Stringgadget and press "RETURN" or click on "DeleteIt" to try to
  115. delete this word. If this word exists in the Lexikon, then
  116. SpellChecker will delete it, otherwise it will display a text with the
  117. message "Word not found". To leave this mode, click on "Quit" or the
  118. "WindowClosegadget".
  119.  
  120. The last Gadget is the "ExportGadget". With this Gadgets it is
  121. possible to export all words of the Lexikon to a textfile. To export
  122. it, click on "ExportLex" and than enter a name for this textfile.
  123. After exporting, You can use an editor to look on this file and to
  124. delete words You don't like. Than You can import this file again with
  125. the Gadget "ExpandLex".
  126.  
  127. Hint: If You use CleanLex, all deleted words are exported to a file
  128. "T:CleanLex.txt". You can use this file in the same way as the
  129. Export-File, for example You delete all wrong words with an editor and
  130. than import the other words again by using "ExpandLex".
  131.  
  132. Stefan Salewski, 16 March 1990
  133.  
  134.  
  135.